﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangePwd.aspx.cs" Inherits="TCS.Web.MembersHome.changepwd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../css/admin.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" language="JavaScript" src="../../js/CheckBox.js"></script>

</head>
<body>
    <form id="Form1" runat="server">
    <div align="center">
        <table cellspacing="0" cellpadding="5" width="700" border="0">
            <tr>
                <td bgcolor='<%=Application[Session["Style"].ToString()+"xtable_bgcolor"]%>'>
                    <table cellspacing="0" bordercolordark='<%=Application[Session["Style"].ToString()+"xtable_bordercolordark"]%>'
                        bordercolorlight='<%=Application[Session["Style"].ToString()+"xtable_bordercolorlight"]%>'
                        cellpadding="5" width="100%" border="1">
                        <tr bgcolor="#e4e4e4">
                            <td bgcolor='<%=Application[Session["Style"].ToString()+"xtable_titlebgcolor"]%>'
                                height="22" align="left">
                                修改账户密码。
                            </td>
                        </tr>
                        <tr>
                            <td height="22">
                                <table cellpadding="0" border="0">
                                    <tr>
                                        <td align="center" colspan="2">
                                            更改密码
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <label>
                                                密码:</label>
                                        </td>
                                        <td>
                                            <input type="password" id="CurrentPassword" name="CurrentPassword" runat="server" /><span
                                                id="CurrentPasswordRequired" title="必须填写“密码”。" style="color: Red; visibility: hidden;">*</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <label>
                                                新密码:</label>
                                        </td>
                                        <td>
                                            <input type="password" id="NewPassword" name="NewPassword" runat="server" /><span
                                                id="NewPasswordRequired" title="必须填写“新密码”。" style="color: Red; visibility: hidden;">*</span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <label>
                                                确认新密码:</label>
                                        </td>
                                        <td>
                                            <input type="password" id="ConfirmNewPassword" name="ConfirmNewPassword" runat="server" /><span
                                                id="ConfirmNewPasswordRequired" title="必须填写“确认新密码”。" style="color: Red; visibility: hidden;">*</span>
                                        </td>
                                    </tr>
                                    <tr id="trNewPasswordCompare" style="display: none">
                                        <td align="center" colspan="2">
                                            <span id="NewPasswordCompare" style="color: Red;">“确认新密码”与“新密码”项必须匹配。</span>
                                        </td>
                                    </tr>
                                    <tr id="trPasswordError" style="display: none">
                                        <td align="center" colspan="2" style="color: Red;">
                                            密码错误或新密码无效。
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <input type="submit" value="更改密码" onclick="return check()" runat="server" id="ChangePasswordPushButton"
                                                onserverclick="ChangePasswordPushButton_Click" />
                                        </td>
                                        <td>
                                            <input type="submit" value="取消" id="CancelPushButton" />
                                        </td>
                                    </tr>
                                </table>

                                <script type="text/javascript">
                    function check()
                    {
                        
                        var i=0;
                        if(document.getElementById("ctl00_MasterContent_CurrentPassword").value=="")
                        {
                            document.getElementById("CurrentPasswordRequired").style.visibility="";
                            i++;
                        }
                        if(document.getElementById("ctl00_MasterContent_NewPassword").value=="")
                        {
                            document.getElementById("NewPasswordRequired").style.visibility="";
                            i++;
                        }
                        if(document.getElementById("ctl00_MasterContent_ConfirmNewPassword").value=="")
                        {
                            document.getElementById("ConfirmNewPasswordRequired").style.visibility="";
                            i++;
                        }
                        if(i>0)
                        {
                            return false;
                        }
                        if(document.getElementById("ctl00_MasterContent_NewPassword").value!=document.getElementById("ctl00_MasterContent_ConfirmNewPassword").value)
                        {
                            document.getElementById("trNewPasswordCompare").style.display="block";
                            return false;
                        }
                    }
                                </script>

                            </td>
                        </tr>
                    </table>
    </div>
    </form>
</body>
</html>
